package com.projectxxxxxxxxxx.ui;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.projectxxxxxxxxxx.R;
import com.projectxxxxxxxxxx.RoboApplication;

public class RoboActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
		setContentView(R.layout.robo_activity);
		// printDimens();
	}

	public void onClick(View v) {
		Intent intent = null;
		switch(v.getId()) {
		case R.id.device:
			intent = new Intent(this, DeviceActivity.class);
			break;
		case R.id.system:
			intent = new Intent(this, SystemActivity.class);
			break;
		case R.id.navigate:
			intent = new Intent(this, NavigateActivity.class);
			break;
		case R.id.statistic:
			intent = new Intent(this, StatisticActivity.class);
			break;
		case R.id.toggle:
			intent = new Intent(this, ToggleActivity.class);
				break;
		case R.id.traffic:
			intent = new Intent(this, TrafficActivity.class);
			break;
		case R.id.sound:

			MediaPlayer mp = MediaPlayer.create(this, R.raw.windows_feed_discovered);
			mp.start();
			mp.setOnCompletionListener(new OnCompletionListener() {
				@Override
				public void onCompletion(MediaPlayer mp) {
					mp.release();
				}
			});
			break;

		case R.id.generate_dimens:
			
			// printDimens();
			
			break;
			
		default:
			break;
		}
		if(intent != null) {
			startActivity(intent);
		}
	}



    @Override
    protected void onDestroy() {
        Log.i(getClass().toString(), RoboApplication.getMethodName());
        super.onDestroy();
    }
}